const useNewsList = ({ infoType, pageSize = 10 }) => {
  const $api = inject("$api");
  const list = ref([]);
  const getList = async () => {
    const { data: rows } = await $api.news.getList({
      pageSize,
      pageNum: 1,
      infoType,
      status: 1,
    });
    list.value = rows;
  };
  getList();

  return {
    list,
  };
};

export default useNewsList;
